def make_chocolate(small, big, goal):
  if small == goal :
    return small
    if (big* 5) % goal <5 and small > (big* 5) % goal <5   :
      return (big* 5) % goal
  if big*5 - goal > 0 and small > (goal % 5) :
    return (goal % 5)
  if goal - big*5 > small :
    return -1
  if goal - big*5 <= small :
    return (goal - big*5)